﻿using System;
using JTLeigh.Commerce.Spencer.Features.ProductFeedback.Business.Caches;
using JTLeigh.Commerce.Spencer.Features.ProductFeedback.Common.Entities;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace JTLeigh.Commerce.Spencer.Features.ProductFeedback.Business.UnitTests.Caches
{

	/// <summary>
	/// Unit tests for the <see cref="InMemoryProductFeedbackMetadataCache"/> class.
	/// </summary>
	[TestClass]
	public class InMemoryProductFeedbackMetadataCacheFixture
	{

		#region Fields

		private static Guid TestTenant1Id = Guid.NewGuid();
		private static Guid TestTenant2Id = Guid.NewGuid();
        private const string TestCatalogId = "BaseCatalog";
		private const string TestCategory1Id = "ABC";
		private const string TestCategory2Id = "DEF";
		private const string TestProduct1Id = "123";
		private const string TestProduct2Id = "456";

		#endregion // Fields

		#region Methods

		#region ProductFeedbackMetadata

		/// <summary>
		/// Ensures <see cref="InMemoryProductFeedbackMetadataCache.GetProductFeedbackMetadata"/> 
		/// and <see cref="InMemoryProductFeedbackMetadataCache.SetProductFeedbackMetadata"/> get 
		/// and set feedback metadata in the cache as expected for multiple tenants.
		/// </summary>
		[TestMethod]
		public void TestGetSetProductFeedbackMetadata()
		{
			InMemoryProductFeedbackMetadataCache cache;
			ProductFeedbackMetadata metadata1;
			ProductFeedbackMetadata metadata2;

			cache = new InMemoryProductFeedbackMetadataCache();
			Assert.IsNull(cache.GetProductFeedbackMetadata(TestTenant1Id));
			Assert.IsNull(cache.GetProductFeedbackMetadata(TestTenant2Id));

			metadata1 = new ProductFeedbackMetadata();
			cache.SetProductFeedbackMetadata(TestTenant1Id, metadata1);
			metadata2 = new ProductFeedbackMetadata();
			cache.SetProductFeedbackMetadata(TestTenant2Id, metadata2);
			Assert.AreSame(metadata1, cache.GetProductFeedbackMetadata(TestTenant1Id));
			Assert.AreSame(metadata2, cache.GetProductFeedbackMetadata(TestTenant2Id));
		}

		#endregion // ProductFeedbackMetadata

		#region ProductRatingAttributeCategoryRelations

		/// <summary>
		/// Ensures <see cref="InMemoryProductFeedbackMetadataCache.GetProductRatingAttributeCategoryRelations"/> 
		/// and <see cref="InMemoryProductFeedbackMetadataCache.SetProductRatingAttributeCategoryRelations"/> 
		/// get and set product rating attribute - category relations in the cache as expected for 
		/// multiple categories for a single tenant.
		/// </summary>
		/// <remarks>
		/// <para>
		/// This test uses two different category identifiers in the same tenant.
		/// </para>
		/// </remarks>
		[TestMethod]
		public void TestGetSetProductRatingAttributeCategoryRelationsSingleTenant()
		{
			InMemoryProductFeedbackMetadataCache cache;
			ProductRatingAttributeCategoryRelations relations1;
			ProductRatingAttributeCategoryRelations relations2;

			cache = new InMemoryProductFeedbackMetadataCache();
			Assert.IsNull(cache.GetProductRatingAttributeCategoryRelations(TestTenant1Id, TestCatalogId, TestCategory1Id));
			Assert.IsNull(cache.GetProductRatingAttributeCategoryRelations(TestTenant1Id, TestCatalogId, TestCategory2Id));

			relations1 = new ProductRatingAttributeCategoryRelations();
			cache.SetProductRatingAttributeCategoryRelations(TestTenant1Id, TestCatalogId, TestCategory1Id, relations1);
			relations2 = new ProductRatingAttributeCategoryRelations();
			cache.SetProductRatingAttributeCategoryRelations(TestTenant1Id, TestCatalogId, TestCategory2Id, relations2);
			Assert.AreSame(relations1, cache.GetProductRatingAttributeCategoryRelations(TestTenant1Id, TestCatalogId, TestCategory1Id));
			Assert.AreSame(relations2, cache.GetProductRatingAttributeCategoryRelations(TestTenant1Id, TestCatalogId, TestCategory2Id));
		}

		/// <summary>
		/// Ensures <see cref="InMemoryProductFeedbackMetadataCache.GetProductRatingAttributeCategoryRelations"/> 
		/// and <see cref="InMemoryProductFeedbackMetadataCache.SetProductRatingAttributeCategoryRelations"/> 
		/// get and set product rating attribute - category relations in the cache as expected for 
		/// a single category for multiple tenants.
		/// </summary>
		/// <remarks>
		/// <para>
		/// This test uses the same category identifier in two different tenants, ensuring 
		/// isolation between tenant cache partitions.
		/// </para>
		/// </remarks>
		[TestMethod]
		public void TestGetSetProductRatingAttributeCategoryRelationsMultipleTenants()
		{
			InMemoryProductFeedbackMetadataCache cache;
			ProductRatingAttributeCategoryRelations relations1;
			ProductRatingAttributeCategoryRelations relations2;

			cache = new InMemoryProductFeedbackMetadataCache();
			Assert.IsNull(cache.GetProductRatingAttributeCategoryRelations(TestTenant1Id, TestCatalogId, TestCategory1Id));
			Assert.IsNull(cache.GetProductRatingAttributeCategoryRelations(TestTenant2Id, TestCatalogId, TestCategory1Id));

			relations1 = new ProductRatingAttributeCategoryRelations();
			cache.SetProductRatingAttributeCategoryRelations(TestTenant1Id, TestCatalogId, TestCategory1Id, relations1);
			relations2 = new ProductRatingAttributeCategoryRelations();
			cache.SetProductRatingAttributeCategoryRelations(TestTenant2Id, TestCatalogId, TestCategory1Id, relations2);
			Assert.AreSame(relations1, cache.GetProductRatingAttributeCategoryRelations(TestTenant1Id, TestCatalogId, TestCategory1Id));
			Assert.AreSame(relations2, cache.GetProductRatingAttributeCategoryRelations(TestTenant2Id, TestCatalogId, TestCategory1Id));
		}

		#endregion // ProductRatingAttributeCategoryRelations

		#region ProductRatingAttributeProductRelations

		/// <summary>
		/// Ensures <see cref="InMemoryProductFeedbackMetadataCache.GetProductRatingAttributeProductRelations"/> 
		/// and <see cref="InMemoryProductFeedbackMetadataCache.SetProductRatingAttributeProductRelations"/> 
		/// get and set product rating attribute - product relations in the cache as expected for 
		/// multiple products for a single tenant.
		/// </summary>
		/// <remarks>
		/// <para>
		/// This test uses two different product identifiers in the same tenant.
		/// </para>
		/// </remarks>
		[TestMethod]
		public void TestGetSetProductRatingAttributeProductRelationsSingleTenant()
		{
			InMemoryProductFeedbackMetadataCache cache;
			ProductRatingAttributeProductRelations relations1;
			ProductRatingAttributeProductRelations relations2;

			cache = new InMemoryProductFeedbackMetadataCache();
			Assert.IsNull(cache.GetProductRatingAttributeProductRelations(TestTenant1Id, TestCatalogId, TestProduct1Id));
			Assert.IsNull(cache.GetProductRatingAttributeProductRelations(TestTenant1Id, TestCatalogId, TestProduct2Id));

			relations1 = new ProductRatingAttributeProductRelations();
			cache.SetProductRatingAttributeProductRelations(TestTenant1Id, TestCatalogId, TestProduct1Id, relations1);
			relations2 = new ProductRatingAttributeProductRelations();
			cache.SetProductRatingAttributeProductRelations(TestTenant1Id, TestCatalogId, TestProduct2Id, relations2);
			Assert.AreSame(relations1, cache.GetProductRatingAttributeProductRelations(TestTenant1Id, TestCatalogId, TestProduct1Id));
			Assert.AreSame(relations2, cache.GetProductRatingAttributeProductRelations(TestTenant1Id, TestCatalogId, TestProduct2Id));
		}

		/// <summary>
		/// Ensures <see cref="InMemoryProductFeedbackMetadataCache.GetProductRatingAttributeProductRelations"/> 
		/// and <see cref="InMemoryProductFeedbackMetadataCache.SetProductRatingAttributeProductRelations"/> 
		/// get and set product rating attribute - product relations in the cache as expected for 
		/// a single product for multiple tenants.
		/// </summary>
		/// <remarks>
		/// <para>
		/// This test uses the same product identifier in two different tenants, ensuring isolation 
		/// between tenant cache partitions.
		/// </para>
		/// </remarks>
		[TestMethod]
		public void TestGetSetProductRatingAttributeProductRelationsMultipleTenants()
		{
			InMemoryProductFeedbackMetadataCache cache;
			ProductRatingAttributeProductRelations relations1;
			ProductRatingAttributeProductRelations relations2;

			cache = new InMemoryProductFeedbackMetadataCache();
			Assert.IsNull(cache.GetProductRatingAttributeProductRelations(TestTenant1Id, TestCatalogId, TestProduct1Id));
			Assert.IsNull(cache.GetProductRatingAttributeProductRelations(TestTenant2Id, TestCatalogId, TestProduct1Id));

			relations1 = new ProductRatingAttributeProductRelations();
			cache.SetProductRatingAttributeProductRelations(TestTenant1Id, TestCatalogId, TestProduct1Id, relations1);
			relations2 = new ProductRatingAttributeProductRelations();
			cache.SetProductRatingAttributeProductRelations(TestTenant2Id, TestCatalogId, TestProduct1Id, relations2);
			Assert.AreSame(relations1, cache.GetProductRatingAttributeProductRelations(TestTenant1Id, TestCatalogId, TestProduct1Id));
			Assert.AreSame(relations2, cache.GetProductRatingAttributeProductRelations(TestTenant2Id, TestCatalogId, TestProduct1Id));
		}

		#endregion // ProductRatingAttributeProductRelations

		#region ProductRecommendationAttributeCategoryRelations

		/// <summary>
		/// Ensures <see cref="InMemoryProductFeedbackMetadataCache.GetProductRecommendationAttributeCategoryRelations"/> 
		/// and <see cref="InMemoryProductFeedbackMetadataCache.SetProductRecommendationAttributeCategoryRelations"/> 
		/// get and set product recommendation attribute - category relations in the cache as 
		/// expected for multiple categories for a single tenant.
		/// </summary>
		/// <remarks>
		/// <para>
		/// This test uses two different category identifiers in the same tenant.
		/// </para>
		/// </remarks>
		[TestMethod]
		public void TestGetSetProductRecommendationAttributeCategoryRelationsSingleTenant()
		{
			InMemoryProductFeedbackMetadataCache cache;
			ProductRecommendationAttributeCategoryRelations relations1;
			ProductRecommendationAttributeCategoryRelations relations2;

			cache = new InMemoryProductFeedbackMetadataCache();
			Assert.IsNull(cache.GetProductRecommendationAttributeCategoryRelations(TestTenant1Id, TestCatalogId, TestCategory1Id));
			Assert.IsNull(cache.GetProductRecommendationAttributeCategoryRelations(TestTenant1Id, TestCatalogId, TestCategory2Id));

			relations1 = new ProductRecommendationAttributeCategoryRelations();
			cache.SetProductRecommendationAttributeCategoryRelations(TestTenant1Id, TestCatalogId, TestCategory1Id, relations1);
			relations2 = new ProductRecommendationAttributeCategoryRelations();
			cache.SetProductRecommendationAttributeCategoryRelations(TestTenant1Id, TestCatalogId, TestCategory2Id, relations2);
			Assert.AreSame(relations1, cache.GetProductRecommendationAttributeCategoryRelations(TestTenant1Id, TestCatalogId, TestCategory1Id));
			Assert.AreSame(relations2, cache.GetProductRecommendationAttributeCategoryRelations(TestTenant1Id, TestCatalogId, TestCategory2Id));
		}

		/// <summary>
		/// Ensures <see cref="InMemoryProductFeedbackMetadataCache.GetProductRecommendationAttributeCategoryRelations"/> 
		/// and <see cref="InMemoryProductFeedbackMetadataCache.SetProductRecommendationAttributeCategoryRelations"/> 
		/// get and set product recommendation attribute - category relations in the cache as 
		/// expected for a single category for multiple tenants.
		/// </summary>
		/// <remarks>
		/// <para>
		/// This test uses the same category identifier in two different tenants, ensuring 
		/// isolation between tenant cache partitions.
		/// </para>
		/// </remarks>
		[TestMethod]
		public void TestGetSetProductRecommendationAttributeCategoryRelationsMultipleTenants()
		{
			InMemoryProductFeedbackMetadataCache cache;
			ProductRecommendationAttributeCategoryRelations relations1;
			ProductRecommendationAttributeCategoryRelations relations2;

			cache = new InMemoryProductFeedbackMetadataCache();
			Assert.IsNull(cache.GetProductRecommendationAttributeCategoryRelations(TestTenant1Id, TestCatalogId, TestCategory1Id));
			Assert.IsNull(cache.GetProductRecommendationAttributeCategoryRelations(TestTenant2Id, TestCatalogId, TestCategory1Id));

			relations1 = new ProductRecommendationAttributeCategoryRelations();
			cache.SetProductRecommendationAttributeCategoryRelations(TestTenant1Id, TestCatalogId, TestCategory1Id, relations1);
			relations2 = new ProductRecommendationAttributeCategoryRelations();
			cache.SetProductRecommendationAttributeCategoryRelations(TestTenant2Id, TestCatalogId, TestCategory1Id, relations2);
			Assert.AreSame(relations1, cache.GetProductRecommendationAttributeCategoryRelations(TestTenant1Id, TestCatalogId, TestCategory1Id));
			Assert.AreSame(relations2, cache.GetProductRecommendationAttributeCategoryRelations(TestTenant2Id, TestCatalogId, TestCategory1Id));
		}

		#endregion // ProductRecommendationAttributeCategoryRelations

		#region ProductRecommendationAttributeProductRelations

		/// <summary>
		/// Ensures <see cref="InMemoryProductFeedbackMetadataCache.GetProductRecommendationAttributeProductRelations"/> 
		/// and <see cref="InMemoryProductFeedbackMetadataCache.SetProductRecommendationAttributeProductRelations"/> 
		/// get and set product recommendation attribute - product relations in the cache as 
		/// expected for multiple products for a single tenant.
		/// </summary>
		/// <remarks>
		/// <para>
		/// This test uses two different product identifiers in the same tenant.
		/// </para>
		/// </remarks>
		[TestMethod]
		public void TestGetSetProductRecommendationAttributeProductRelationsSingleTenant()
		{
			InMemoryProductFeedbackMetadataCache cache;
			ProductRecommendationAttributeProductRelations relations1;
			ProductRecommendationAttributeProductRelations relations2;

			cache = new InMemoryProductFeedbackMetadataCache();
			Assert.IsNull(cache.GetProductRecommendationAttributeProductRelations(TestTenant1Id, TestCatalogId, TestProduct1Id));
			Assert.IsNull(cache.GetProductRecommendationAttributeProductRelations(TestTenant1Id, TestCatalogId, TestProduct2Id));

			relations1 = new ProductRecommendationAttributeProductRelations();
			cache.SetProductRecommendationAttributeProductRelations(TestTenant1Id, TestCatalogId, TestProduct1Id, relations1);
			relations2 = new ProductRecommendationAttributeProductRelations();
			cache.SetProductRecommendationAttributeProductRelations(TestTenant1Id, TestCatalogId, TestProduct2Id, relations2);
			Assert.AreSame(relations1, cache.GetProductRecommendationAttributeProductRelations(TestTenant1Id, TestCatalogId, TestProduct1Id));
			Assert.AreSame(relations2, cache.GetProductRecommendationAttributeProductRelations(TestTenant1Id, TestCatalogId, TestProduct2Id));
		}

		/// <summary>
		/// Ensures <see cref="InMemoryProductFeedbackMetadataCache.GetProductRecommendationAttributeProductRelations"/> 
		/// and <see cref="InMemoryProductFeedbackMetadataCache.SetProductRecommendationAttributeProductRelations"/> 
		/// get and set product recommendation attribute - product relations in the cache as 
		/// expected for a single product for multiple tenants.
		/// </summary>
		/// <remarks>
		/// <para>
		/// This test uses the same product identifier in two different tenants, ensuring isolation 
		/// between tenant cache partitions.
		/// </para>
		/// </remarks>
		[TestMethod]
		public void TestGetSetProductRecommendationAttributeProductRelationsMultipleTenants()
		{
			InMemoryProductFeedbackMetadataCache cache;
			ProductRecommendationAttributeProductRelations relations1;
			ProductRecommendationAttributeProductRelations relations2;

			cache = new InMemoryProductFeedbackMetadataCache();
			Assert.IsNull(cache.GetProductRecommendationAttributeProductRelations(TestTenant1Id, TestCatalogId, TestProduct1Id));
			Assert.IsNull(cache.GetProductRecommendationAttributeProductRelations(TestTenant2Id, TestCatalogId, TestProduct1Id));

			relations1 = new ProductRecommendationAttributeProductRelations();
			cache.SetProductRecommendationAttributeProductRelations(TestTenant1Id, TestCatalogId, TestProduct1Id, relations1);
			relations2 = new ProductRecommendationAttributeProductRelations();
			cache.SetProductRecommendationAttributeProductRelations(TestTenant2Id, TestCatalogId, TestProduct1Id, relations2);
			Assert.AreSame(relations1, cache.GetProductRecommendationAttributeProductRelations(TestTenant1Id, TestCatalogId, TestProduct1Id));
			Assert.AreSame(relations2, cache.GetProductRecommendationAttributeProductRelations(TestTenant2Id, TestCatalogId, TestProduct1Id));
		}

		#endregion // ProductRecommendationAttributeProductRelations

		#region ProductReviewAttributeCategoryRelations

		/// <summary>
		/// Ensures <see cref="InMemoryProductFeedbackMetadataCache.GetProductReviewAttributeCategoryRelations"/> 
		/// and <see cref="InMemoryProductFeedbackMetadataCache.SetProductReviewAttributeCategoryRelations"/> 
		/// get and set product review attribute - category relations in the cache as 
		/// expected for multiple categories for a single tenant.
		/// </summary>
		/// <remarks>
		/// <para>
		/// This test uses two different category identifiers in the same tenant.
		/// </para>
		/// </remarks>
		[TestMethod]
		public void TestGetSetProductReviewAttributeCategoryRelationsSingleTenant()
		{
			InMemoryProductFeedbackMetadataCache cache;
			ProductReviewAttributeCategoryRelations relations1;
			ProductReviewAttributeCategoryRelations relations2;

			cache = new InMemoryProductFeedbackMetadataCache();
			Assert.IsNull(cache.GetProductReviewAttributeCategoryRelations(TestTenant1Id, TestCatalogId, TestCategory1Id));
			Assert.IsNull(cache.GetProductReviewAttributeCategoryRelations(TestTenant1Id, TestCatalogId, TestCategory2Id));

			relations1 = new ProductReviewAttributeCategoryRelations();
			cache.SetProductReviewAttributeCategoryRelations(TestTenant1Id, TestCatalogId, TestCategory1Id, relations1);
			relations2 = new ProductReviewAttributeCategoryRelations();
			cache.SetProductReviewAttributeCategoryRelations(TestTenant1Id, TestCatalogId, TestCategory2Id, relations2);
			Assert.AreSame(relations1, cache.GetProductReviewAttributeCategoryRelations(TestTenant1Id, TestCatalogId, TestCategory1Id));
			Assert.AreSame(relations2, cache.GetProductReviewAttributeCategoryRelations(TestTenant1Id, TestCatalogId, TestCategory2Id));
		}

		/// <summary>
		/// Ensures <see cref="InMemoryProductFeedbackMetadataCache.GetProductReviewAttributeCategoryRelations"/> 
		/// and <see cref="InMemoryProductFeedbackMetadataCache.SetProductReviewAttributeCategoryRelations"/> 
		/// get and set product review attribute - category relations in the cache as expected for 
		/// a single category for multiple tenants.
		/// </summary>
		/// <remarks>
		/// <para>
		/// This test uses the same category identifier in two different tenants, ensuring 
		/// isolation between tenant cache partitions.
		/// </para>
		/// </remarks>
		[TestMethod]
		public void TestGetSetProductReviewAttributeCategoryRelationsMultipleTenants()
		{
			InMemoryProductFeedbackMetadataCache cache;
			ProductReviewAttributeCategoryRelations relations1;
			ProductReviewAttributeCategoryRelations relations2;

			cache = new InMemoryProductFeedbackMetadataCache();
			Assert.IsNull(cache.GetProductReviewAttributeCategoryRelations(TestTenant1Id, TestCatalogId, TestCategory1Id));
			Assert.IsNull(cache.GetProductReviewAttributeCategoryRelations(TestTenant2Id, TestCatalogId, TestCategory1Id));

			relations1 = new ProductReviewAttributeCategoryRelations();
			cache.SetProductReviewAttributeCategoryRelations(TestTenant1Id, TestCatalogId, TestCategory1Id, relations1);
			relations2 = new ProductReviewAttributeCategoryRelations();
			cache.SetProductReviewAttributeCategoryRelations(TestTenant2Id, TestCatalogId, TestCategory1Id, relations2);
			Assert.AreSame(relations1, cache.GetProductReviewAttributeCategoryRelations(TestTenant1Id, TestCatalogId, TestCategory1Id));
			Assert.AreSame(relations2, cache.GetProductReviewAttributeCategoryRelations(TestTenant2Id, TestCatalogId, TestCategory1Id));
		}

		#endregion // ProductReviewAttributeCategoryRelations

		#region ProductReviewAttributeProductRelations

		/// <summary>
		/// Ensures <see cref="InMemoryProductFeedbackMetadataCache.GetProductReviewAttributeProductRelations"/> 
		/// and <see cref="InMemoryProductFeedbackMetadataCache.SetProductReviewAttributeProductRelations"/> 
		/// get and set product review attribute - product relations in the cache as 
		/// expected for multiple products for a single tenant.
		/// </summary>
		/// <remarks>
		/// <para>
		/// This test uses two different product identifiers in the same tenant.
		/// </para>
		/// </remarks>
		[TestMethod]
		public void TestGetSetProductReviewAttributeProductRelationsSingleTenant()
		{
			InMemoryProductFeedbackMetadataCache cache;
			ProductReviewAttributeProductRelations relations1;
			ProductReviewAttributeProductRelations relations2;

			cache = new InMemoryProductFeedbackMetadataCache();
			Assert.IsNull(cache.GetProductReviewAttributeProductRelations(TestTenant1Id, TestCatalogId, TestProduct1Id));
			Assert.IsNull(cache.GetProductReviewAttributeProductRelations(TestTenant1Id, TestCatalogId, TestProduct2Id));

			relations1 = new ProductReviewAttributeProductRelations();
			cache.SetProductReviewAttributeProductRelations(TestTenant1Id, TestCatalogId, TestProduct1Id, relations1);
			relations2 = new ProductReviewAttributeProductRelations();
			cache.SetProductReviewAttributeProductRelations(TestTenant1Id, TestCatalogId, TestProduct2Id, relations2);
			Assert.AreSame(relations1, cache.GetProductReviewAttributeProductRelations(TestTenant1Id, TestCatalogId, TestProduct1Id));
			Assert.AreSame(relations2, cache.GetProductReviewAttributeProductRelations(TestTenant1Id, TestCatalogId, TestProduct2Id));
		}

		/// <summary>
		/// Ensures <see cref="InMemoryProductFeedbackMetadataCache.GetProductReviewAttributeProductRelations"/> 
		/// and <see cref="InMemoryProductFeedbackMetadataCache.SetProductReviewAttributeProductRelations"/> 
		/// get and set product review attribute - product relations in the cache as expected for 
		/// a single product for multiple tenants.
		/// </summary>
		/// <remarks>
		/// <para>
		/// This test uses the same product identifier in two different tenants, ensuring isolation
		/// between tenant cache partitions.
		/// </para>
		/// </remarks>
		[TestMethod]
		public void TestGetSetProductReviewAttributeProductRelationsMultipleTenants()
		{
			InMemoryProductFeedbackMetadataCache cache;
			ProductReviewAttributeProductRelations relations1;
			ProductReviewAttributeProductRelations relations2;

			cache = new InMemoryProductFeedbackMetadataCache();
			Assert.IsNull(cache.GetProductReviewAttributeProductRelations(TestTenant1Id, TestCatalogId, TestProduct1Id));
			Assert.IsNull(cache.GetProductReviewAttributeProductRelations(TestTenant2Id, TestCatalogId, TestProduct1Id));

			relations1 = new ProductReviewAttributeProductRelations();
			cache.SetProductReviewAttributeProductRelations(TestTenant1Id, TestCatalogId, TestProduct1Id, relations1);
			relations2 = new ProductReviewAttributeProductRelations();
			cache.SetProductReviewAttributeProductRelations(TestTenant2Id, TestCatalogId, TestProduct1Id, relations2);
			Assert.AreSame(relations1, cache.GetProductReviewAttributeProductRelations(TestTenant1Id, TestCatalogId, TestProduct1Id));
			Assert.AreSame(relations2, cache.GetProductReviewAttributeProductRelations(TestTenant2Id, TestCatalogId, TestProduct1Id));
		}

		#endregion // ProductReviewAttributeProductRelations

		#endregion // Methods

	}

}
